<nav class="navbar navbar-default" role="navigation">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" ng-click="vm.toggleNavbar()">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand logo" href="#/" ng-click="vm.collapseNavbar()">
                <img class="logo-img" src="content/images/logo.png" alt="logo"/>
                <span data-translate="global.title">Milkbee</span> <span class="navbar-version">v{{VERSION}}</span>
            </a>
        </div>
        <div class="navbar-collapse" uib-collapse="vm.isNavbarCollapsed" ng-switch="vm.isAuthenticated()">
            <ul class="nav navbar-nav navbar-right">
                <li ui-sref-active="active">
                    <a ui-sref="home" ng-click="vm.collapseNavbar()">
                        <span class="glyphicon glyphicon-home"></span>
                        <span class="hidden-sm" data-translate="global.menu.home">Home</span>
                    </a>
                </li>
                <!-- jhipster-needle-add-element-to-menu - JHipster will add new menu items here -->
                <li  ng-switch-when="true" uib-dropdown class="dropdown pointer">
                    <a class="dropdown-toggle" uib-dropdown-toggle href="" id="entity-menu">
                        <span>
                            <span class="glyphicon glyphicon-tree-deciduous"></span>
                            <span class="hidden-sm" data-translate="global.menu.my.main">
                                Entities
                            </span>
                            <b class="caret"></b>
                        </span>
                    </a>
                    <ul class="dropdown-menu" uib-dropdown-menu>                
                         <li ui-sref-active="active">
                            <a ui-sref="instants" ng-click="vm.collapseNavbar()">
                                <span data-translate="global.menu.my.instants">instants</span>
                            </a>
                         </li>  
                         <li ui-sref-active="active">
                            <a ui-sref="myprofile" ng-click="vm.collapseNavbar()">
                                <span data-translate="global.menu.my.profile">Profile</span>
                            </a>
                         </li>  
                         <li ui-sref-active="active">
                            <a ui-sref="mymessage" ng-click="vm.collapseNavbar()">
                                <span data-translate="global.menu.my.message">Message</span>
                            </a>
                         </li>  
                         <li ui-sref-active="active">
                            <a ui-sref="mycard" ng-click="vm.collapseNavbar()">
                                <span data-translate="global.menu.my.card">Card</span>
                            </a>
                         </li>  
                         <li ui-sref-active="active">
                            <a ui-sref="mycomment" ng-click="vm.collapseNavbar()">
                                <span data-translate="global.menu.my.comment">Comment</span>
                            </a>
                         </li>  
                         <li ui-sref-active="active">
                            <a ui-sref="myfocus" ng-click="vm.collapseNavbar()">
                                <span data-translate="global.menu.my.focus">Focus</span>
                            </a>
                         </li>  
                         <li ui-sref-active="active">
                            <a ui-sref="myfocuscard" ng-click="vm.collapseNavbar()">
                                <span data-translate="global.menu.my.focuscard">FocusCard</span>
                            </a>
                         </li>  
                         <li ui-sref-active="active">
                            <a ui-sref="myfans" ng-click="vm.collapseNavbar()">
                                <span data-translate="global.menu.my.fans">Fans</span>
                            </a>
                        </li>   
                         <li ui-sref-active="active">
                            <a ui-sref="myvote" ng-click="vm.collapseNavbar()">
                                <span data-translate="global.menu.my.votes">votes</span>
                            </a>
                        </li>   
                         <li ui-sref-active="active">
                            <a ui-sref="myfavorite" ng-click="vm.collapseNavbar()">
                                <span data-translate="global.menu.my.favorite">favorite</span>
                            </a>
                        </li>   
                        <li ui-sref-active="active">
                            <a ui-sref="mypresent" ng-click="vm.collapseNavbar()">
                                <span data-translate="global.menu.my.present">present</span>
                            </a>
                        </li> 
                         <li ui-sref-active="active">
                            <a ui-sref="myaddress" ng-click="vm.collapseNavbar()">
                                <span data-translate="global.menu.my.address">address</span>
                            </a>
                        </li>  
                        
                        <li ui-sref-active="active">
                            <a ui-sref="mywinner" ng-click="vm.collapseNavbar()">
                                <span data-translate="global.menu.entities.winner">my winner</span>
                            </a>
                        </li> 
                    </ul>
                </li>
                <li ng-class="{active: false}"  uib-dropdown class="dropdown pointer" has-authority="ROLE_USER" >
                    <a class="dropdown-toggle" uib-dropdown-toggle href="" id="account-menu">
                        <span>
                             <span class="glyphicon glyphicon-king"></span> 
                            <span class="hidden-sm" data-translate="global.menu.moderator.main">
                                Moderator
                            </span>
                            <b class="caret"></b>
                        </span>
                    </a>
                    <ul class="dropdown-menu" uib-dropdown-menu>
                        <li ui-sref-active="active" ng-switch-when="true">
                            <a ui-sref="modcategory" ng-click="vm.collapseNavbar()">
                                <span data-translate="global.menu.moderator.category">category</span>
                            </a>
                        </li>
                        <li ui-sref-active="active" ng-switch-when="true">
                            <a ui-sref="applycard" ng-click="vm.collapseNavbar()">
                                <span data-translate="global.menu.moderator.applycard">card</span>
                            </a>
                        </li>
                        <li ui-sref-active="active" ng-switch-when="true">
                            <a ui-sref="modcard" ng-click="vm.collapseNavbar()">
                                <span data-translate="global.menu.moderator.card">card</span>
                            </a>
                        </li>
                        <li ui-sref-active="active" ng-switch-when="true">
                            <a ui-sref="modcomment" ng-click="vm.collapseNavbar()">
                                <span data-translate="global.menu.moderator.comment">comment</span>
                            </a>
                        </li>
                        <li ui-sref-active="active" ng-switch-when="true">
                            <a ui-sref="modleaguer" ng-click="vm.collapseNavbar()">
                                <span data-translate="global.menu.moderator.leaguer">leaguer</span>
                            </a>
                        </li>
                     </ul>
                </li>
                <li ng-class="{active: false}"  uib-dropdown class="dropdown pointer" has-authority="ROLE_USER" >
                    <a class="dropdown-toggle" uib-dropdown-toggle href="" id="account-menu">
                        <span>
                             <span class="glyphicon glyphicon-shopping-cart"></span> 
                            <span class="hidden-sm" data-translate="global.menu.ware.main">
                                ware
                            </span>
                            <b class="caret"></b>
                        </span>
                    </a>
                    <ul class="dropdown-menu" uib-dropdown-menu>
                        <li ui-sref-active="active" ng-switch-when="true">
                            <a ui-sref="myware" ng-click="vm.collapseNavbar()">
                                <span data-translate="global.menu.ware.ware">ware</span>
                            </a>
                        </li>
                        <li ui-sref-active="active" ng-switch-when="true">
                            <a ui-sref="myexchange({stat:'1'})" ng-click="vm.collapseNavbar()">
                                <span data-translate="global.menu.ware.exchange">exchange</span>
                            </a>
                        </li>
                        <li ui-sref-active="active" ng-switch-when="true">
                            <a ui-sref="mysweepstake" ng-click="vm.collapseNavbar()">
                                <span data-translate="global.menu.ware.sweepstakes">sweepstakes</span>
                            </a>
                        </li>
                       
                     </ul>
                </li>
                <!-- admin manage ext -->
                <li uib-dropdown class="dropdown pointer" ng-switch-when="true" has-authority="ROLE_ADMIN" >
                    <a class="dropdown-toggle" uib-dropdown-toggle href="" id="entity-menu-ext">
                        <span>
                            <span class="glyphicon glyphicon-pencil"></span>
                            <span class="hidden-sm" data-translate="global.menu.entities.ext">
                                Entities
                            </span>
                            <b class="caret"></b>
                        </span>
                    </a>
                    <ul class="dropdown-menu"  uib-dropdown-menu>
                        <li ui-sref-active="active">
                            <a ui-sref="forum" ng-click="vm.collapseNavbar()">
                                <span data-translate="global.menu.entities.forum">Forum</span>
                            </a>
                        </li>
                        
                        <li ui-sref-active="active">
                            <a ui-sref="card" ng-click="vm.collapseNavbar()">
                                <span data-translate="global.menu.entities.card">Card</span>
                            </a>
                        </li>  
                        <li ui-sref-active="active">
                            <a ui-sref="estate" ng-click="vm.collapseNavbar()">
                                <span data-translate="global.menu.entities.estate">Estate</span>
                            </a>
                        </li>
                        <li ui-sref-active="active">
                            <a ui-sref="category" ng-click="vm.collapseNavbar()">
                                <span data-translate="global.menu.entities.category">Category</span>
                            </a>
                        </li>
                        <li ui-sref-active="active">
                            <a ui-sref="comment" ng-click="vm.collapseNavbar()">
                                <span data-translate="global.menu.entities.comment">Comment</span>
                            </a>
                        </li>
                        <li ui-sref-active="active">
                            <a ui-sref="factor" ng-click="vm.collapseNavbar()">
                                <span data-translate="global.menu.entities.factor">Factor</span>
                            </a>
                        </li>
                        <li ui-sref-active="active">
                            <a ui-sref="trade" ng-click="vm.collapseNavbar()">
                                <span data-translate="global.menu.entities.trade">Trade</span>
                            </a>
                        </li>
                        <li ui-sref-active="active">
                            <a ui-sref="leaguer" ng-click="vm.collapseNavbar()">
                                <span data-translate="global.menu.entities.leaguer">Leaguer</span>
                            </a>
                        </li>
                        <li ui-sref-active="active">
                            <a ui-sref="moderator" ng-click="vm.collapseNavbar()">
                                <span data-translate="global.menu.entities.moderator">Moderator</span>
                            </a>
                        </li>
                        <li ui-sref-active="active">
                            <a ui-sref="gift" ng-click="vm.collapseNavbar()">
                                <span data-translate="global.menu.entities.gift">Gift</span>
                            </a>
                        </li>
                        <li ui-sref-active="active">
                            <a ui-sref="present" ng-click="vm.collapseNavbar()">
                                <span data-translate="global.menu.entities.present">Present</span>
                            </a>
                        </li>
                        <li ui-sref-active="active">
                            <a ui-sref="ware" ng-click="vm.collapseNavbar()">
                                <span data-translate="global.menu.entities.ware">Ware</span>
                            </a>
                        </li>
                        <li ui-sref-active="active">
                            <a ui-sref="exchange-record" ng-click="vm.collapseNavbar()">
                                <span data-translate="global.menu.entities.exchangeRecord">exchange-record</span>
                            </a>
                        </li>
                        <li ui-sref-active="active">
                            <a ui-sref="sweepstake" ng-click="vm.collapseNavbar()">
                                <span data-translate="global.menu.entities.sweepstake">Sweepstake</span>
                            </a>
                        </li>
                        <li ui-sref-active="active">
                            <a ui-sref="winner" ng-click="vm.collapseNavbar()">
                                <span data-translate="global.menu.entities.winner">winner</span>
                            </a>
                        </li>
                        <li ui-sref-active="active">
                            <a ui-sref="advertisement" ng-click="vm.collapseNavbar()">
                                <span data-translate="global.menu.entities.advertisement">advertisement</span>
                            </a>
                        </li>
                    </ul>
                </li>

                <li ng-class="{active: vm.$state.includes('account')}"  uib-dropdown class="dropdown pointer">
                    <a class="dropdown-toggle" uib-dropdown-toggle href="" id="account-menu">
                        <span>
                            <span class="glyphicon glyphicon-user"></span>
                            <span class="hidden-sm" data-translate="global.menu.account.main">
                                Account
                            </span>
                            <b class="caret"></b>
                        </span>
                    </a>
                    <ul class="dropdown-menu" uib-dropdown-menu>
                        <li ui-sref-active="active" ng-switch-when="true">
                            <a ui-sref="settings" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-wrench"></span>&nbsp;
                                <span data-translate="global.menu.account.settings">Settings</span>
                            </a>
                        </li>
                        <li ui-sref-active="active" ng-switch-when="true">
                            <a ui-sref="password" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-lock"></span>&nbsp;
                                <span data-translate="global.menu.account.password">Password</span>
                            </a>
                        </li>
                        <li ui-sref-active="active" ng-switch-when="true">
                            <a href="" ng-click="vm.logout()" id="logout">
                                <span class="glyphicon glyphicon-log-out"></span>&nbsp;
                                <span data-translate="global.menu.account.logout">Sign out</span>
                            </a>
                        </li>
                        <li ui-sref-active="active" ng-switch-when="false">
                            <a href="" ng-click="vm.login()" id="login">
                                <span class="glyphicon glyphicon-log-in"></span>&nbsp;
                                <span data-translate="global.menu.account.login">Sign in</span>
                            </a>
                        </li>
                        <li ui-sref-active="active" ng-switch-when="false">
                            <a ui-sref="register" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-plus-sign"></span>&nbsp;
                                <span data-translate="global.menu.account.register">Register</span>
                            </a>
                        </li>
                        
                    </ul>
                </li>
                <li ng-class="{active: vm.$state.includes('admin')}"  ng-switch-when="true" has-authority="ROLE_ADMIN" uib-dropdown class="dropdown pointer">
                    <a class="dropdown-toggle" uib-dropdown-toggle href="" id="admin-menu">
                        <span>
                            <span class="glyphicon glyphicon-tower"></span>
                            <span class="hidden-sm" data-translate="global.menu.admin.main">Administration</span>
                            <b class="caret"></b>
                        </span>
                    </a>
                    <ul class="dropdown-menu" uib-dropdown-menu>
                    	<li ui-sref-active="active">
                            <a ui-sref="groupmonth" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-tasks"></span>&nbsp;
                                <span data-translate="global.menu.admin.lastmonth">last month</span>
                            </a>
                        </li>
                   <!--  	<li ui-sref-active="active">
                            <a ui-sref="daycount" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-tasks"></span>&nbsp;
                                <span data-translate="global.menu.admin.daycount">day count</span>
                            </a>
                        </li> -->
                        <li ui-sref-active="active">
                            <a ui-sref="user-management" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-user"></span>&nbsp;
                                <span data-translate="global.menu.admin.userManagement">User management</span>
                            </a>
                        </li>
                        <li ui-sref-active="active">
                            <a ui-sref="jhi-tracker" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-eye-open"></span>&nbsp;
                                <span data-translate="global.menu.admin.tracker">User tracker</span>
                            </a>
                        </li>
                        <li ui-sref-active="active">
                            <a ui-sref="jhi-metrics" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-dashboard"></span>&nbsp;
                                <span data-translate="global.menu.admin.metrics">Metrics</span>
                            </a>
                        </li>
                        <li ui-sref-active="active">
                            <a ui-sref="jhi-health" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-heart"></span>&nbsp;
                                <span data-translate="global.menu.admin.health">Health</span>
                            </a>
                        </li>
                        <!--
                        <li ui-sref-active="active">
                            <a ui-sref="jhi-configuration" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-list-alt"></span>&nbsp;
                                <span data-translate="global.menu.admin.configuration">Configuration</span>
                            </a>
                        </li>                       
                        <li ui-sref-active="active">
                            <a ui-sref="audits" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-bell"></span>&nbsp;
                                <span data-translate="global.menu.admin.audits">Audits</span>
                            </a>
                        </li>
                        
                        <li ui-sref-active="active">
                            <a ui-sref="logs" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-tasks"></span>&nbsp;
                                <span data-translate="global.menu.admin.logs">Logs</span>
                            </a>
                        </li>
                        -->
                        <!-- 
                        <li ng-show="vm.swaggerEnabled" ui-sref-active="active">
                            <a ui-sref="docs" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-book"></span>&nbsp;
                                <span data-translate="global.menu.admin.apidocs">API</span>
                            </a>
                        </li>
  						-->
                        <!-- jhipster-needle-add-element-to-admin-menu - JHipster will add entities to the admin menu here -->
                    </ul>
                </li>
                <!-- 
                <li ui-sref-active="active" uib-dropdown class="dropdown pointer" ng-controller="JhiLanguageController as languageVm">
                    <a class="dropdown-toggle" uib-dropdown-toggle href="" ng-if="languageVm.languages.length > 1">
                        <span>
                            <span class="glyphicon glyphicon-flag"></span>
                            <span class="hidden-sm" data-translate="global.menu.language">Language</span>
                            <b class="caret"></b>
                        </span>
                    </a>
                    <ul class="dropdown-menu" uib-dropdown-menu ng-if="languageVm.languages.length > 1">
                        <li active-menu="{{language}}" ng-repeat="language in languageVm.languages">
                            <a href="" ng-click="languageVm.changeLanguage(language);vm.collapseNavbar();">{{language | findLanguageFromKey}}</a>
                        </li>
                    </ul>
                </li>
                -->
            </ul>
        </div>
    </div>
</nav>
